import request from "@/utils/request";

export function getUsers() {
  return request({
    url: "/user",
    method: "get",
  });
}

export function addUser(data: any) {
  return request({
    url: "/user",
    method: "post",
    data,
  });
}

export function editUser(id: any, data: any) {
  return request({
    url: `/user/${id}`,
    method: "put",
    data,
  });
}

export function deleteUser(code: any) {
  return request({
    url: `/user/${code}`,
    method: "delete",
  });
}
